﻿"use strict";
define(["service/service", "service/httpService"], function (service) {
    service.factory("productService", function ($location, httpService) {
        var methods = {
            gets: function (params) {
                return httpService.get("/Product/gets", params);
            },
            get: function (params) {
                return httpService.get("/Product/get", params);
            },
            save: function (params) {
                return httpService.upload("/Product/save", params);
            },
            delete: function (id) {
                return httpService.delete("/Product/delete/" + id);
            },
            disable: function (id) {
                return httpService.post("/Product/Disable/" + id);
            },
            audit: function (params) {
                return httpService.post("/Product/Audit", params);
            },
            declarations: function (params) {
                return httpService.get("/Product/GetGoodsDeclarations", params);
            }
        }
        return methods;
    });
});